<template>
  <div>
    <div :is="componentId.module"></div>
  </div>
</template>
<script setup lang="ts">
import { reactive, ref } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();
let componentId = reactive({
  module: null,
});
let componentName = ref(route.params.id);
console.log(componentName.value);
import(`../${componentName.value}/index.ts`).then((module) => {
  componentId.module = module;
});
</script>
<style lang="scss" scoped></style>
